﻿<UserControl x:Class="DSASample.Restaurants.Module.Views.RestaurantsView.RestaurantsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Width="Auto" Height="Auto" >

    <StackPanel>
        <TextBlock Visibility="Collapsed" TextWrapping="Wrap" Name="txt_error" Width="Auto" Height="Auto" HorizontalAlignment="Center" VerticalAlignment="Center">There has been an error contacting the back-end service.</TextBlock>
        <TextBlock Visibility="Collapsed" TextWrapping="Wrap" Name="txt_offline" Width="Auto" Height="Auto"  VerticalAlignment="Center" HorizontalAlignment="Center">You are working in offline mode. The restaurants list will be loaded when a connection is detected.</TextBlock>
        <Button Visibility="Collapsed" Name="btn_retry" VerticalAlignment="Center" HorizontalAlignment="Center">Click here to Retry</Button>
        <ListView Visibility="Collapsed" Height="{Binding Path=ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" Width="{Binding Path=ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" Name="menuItemlistView" Background="Transparent" HorizontalAlignment="Center" VerticalAlignment="Center" ItemsSource="{Binding}">
            <ListView.View>        
                <GridView>
                    <GridViewColumn Header="Restaurants" DisplayMemberBinding="{Binding Path=Name}" />
                </GridView>
            </ListView.View>
        </ListView>
    </StackPanel>
</UserControl>
